package com.jtjrenren.android.taxi.driver.bean.control;

import com.jtjrenren.android.taxi.driver.Constants;
import com.library.utils.RegexUtils;
import com.library.utils.StringUtils;

/**
 * Created by Administrator on 2016/2/29.
 * 抢单结果信息
 */
public class CmdQdResultResponse extends CmdContentBase {
    private String orderID;
    private int orderType;
    private String useDate;
    private String passgerLat, passgerLng;
    private String endLat, endLng;
    private String tip;
    private String passgerPhone;
    private String orderDesc;

    //自己添加的字段
    private boolean isQdSuccess = false;

    public String getOrderID() {
        return orderID;
    }

    public void setOrderID(String orderID) {
        this.orderID = orderID;
    }

    public int getOrderType() {
        return orderType;
    }

    public void setOrderType(int orderType) {
        this.orderType = orderType;
    }

    public String getUseDate() {
        return useDate;
    }

    public void setUseDate(String useDate) {
        this.useDate = useDate;
    }

    public String getPassgerLat() {
        return passgerLat;
    }

    public void setPassgerLat(String passgerLat) {
        this.passgerLat = passgerLat;
    }

    public String getPassgerLng() {
        return passgerLng;
    }

    public void setPassgerLng(String passgerLng) {
        this.passgerLng = passgerLng;
    }

    public String getEndLat() {
        return endLat;
    }

    public void setEndLat(String endLat) {
        this.endLat = endLat;
    }

    public String getEndLng() {
        return endLng;
    }

    public void setEndLng(String endLng) {
        this.endLng = endLng;
    }

    public String getTip() {
        return tip;
    }

    public void setTip(String tip) {
        if (!StringUtils.isEmpty(tip) && RegexUtils.isNumStr(tip))
            tip = Integer.parseInt(tip) / 10.0 + "";

        this.tip = tip;
    }

    public String getPassgerPhone() {
        return passgerPhone;
    }

    public void setPassgerPhone(String passgerPhone) {
        this.passgerPhone = passgerPhone;
    }

    public String getOrderDesc() {
        return orderDesc;
    }

    public void setOrderDesc(String orderDesc) {
        this.orderDesc = orderDesc;
    }

    public boolean isQdSuccess() {
        return isQdSuccess;
    }

    public void setQdSuccess(boolean qdSuccess) {
        isQdSuccess = qdSuccess;
    }


    @Override
    public String toString() {
        return "CmdQdResultResponse{" +
                "orderID='" + orderID + '\'' +
                ", orderType=" + orderType +
                ", useDate='" + useDate + '\'' +
                ", passgerLat='" + passgerLat + '\'' +
                ", passgerLng='" + passgerLng + '\'' +
                ", endLat='" + endLat + '\'' +
                ", endLng='" + endLng + '\'' +
                ", tip='" + tip + '\'' +
                ", passgerPhone='" + passgerPhone + '\'' +
                ", orderDesc='" + orderDesc + '\'' +
                ", isQdSuccess=" + isQdSuccess +
                '}';
    }

    @Override
    public String getBrocastAction() {
        return Constants.ACTION_CONTROL_RESPONSE_QDRESULT;
    }
}
